<?php

namespace Apps\Common\Enum;


class GeneralState extends Enum
{
    /**
     * 删除
     */
    const Delete = -1;
    /**
     * 默认
     */
    const _Default = 0;
    /**
     * 正常
     */
    const Normal = 1;

    public static function valuesExplain()
    {
        return [
            '-1' => '删除',
            '0' => '关闭',
            '1' => '开通',
        ];
    }

    public static function value2Str($v)
    {
        $data = self::valuesExplain();
        if(isset($data[strval($v)])) {
            return $data[strval($v)];
        }
        return '';
    }
}